3.202 \(\int \csc (c+d x) (\cot (c+d x)+\csc (c+d x)) \, dx\)

Optimal. Leaf size=23 \[ -\frac {\cot (c+d x)}{d}-\frac {\csc (c+d x)}{d} \]

[Out]

-cot(d*x+c)/d-csc(d*x+c)/d

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {4397, 2669, 3767, 8} \[ -\frac {\cot (c+d x)}{d}-\frac {\csc (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Int[Csc[c + d*x]*(Cot[c + d*x] + Csc[c + d*x]),x]

[Out]

-(Cot[c + d*x]/d) - Csc[c + d*x]/d

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2669

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> -Simp[(b*(g*Cos[
e + f*x])^(p + 1))/(f*g*(p + 1)), x] + Dist[a, Int[(g*Cos[e + f*x])^p, x], x] /; FreeQ[{a, b, e, f, g, p}, x]
&& (IntegerQ[2*p] || NeQ[a^2 - b^2, 0])

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 4397

Int[u_, x_Symbol] :> Int[TrigSimplify[u], x] /; TrigSimplifyQ[u]

Rubi steps

\begin {align*} \int \csc (c+d x) (\cot (c+d x)+\csc (c+d x)) \, dx &=\int (1+\cos (c+d x)) \csc ^2(c+d x) \, dx\\ &=-\frac {\csc (c+d x)}{d}+\int \csc ^2(c+d x) \, dx\\ &=-\frac {\csc (c+d x)}{d}-\frac {\operatorname {Subst}(\int 1 \, dx,x,\cot (c+d x))}{d}\\ &=-\frac {\cot (c+d x)}{d}-\frac {\csc (c+d x)}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 15, normalized size = 0.65 \[ -\frac {\cot \left (\frac {1}{2} (c+d x)\right )}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[c + d*x]*(Cot[c + d*x] + Csc[c + d*x]),x]

[Out]

-(Cot[(c + d*x)/2]/d)

________________________________________________________________________________________

fricas [A]  time = 0.50, size = 21, normalized size = 0.91 \[ -\frac {\cos \left (d x + c\right ) + 1}{d \sin \left (d x + c\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)*(cot(d*x+c)+csc(d*x+c)),x, algorithm="fricas")

[Out]

-(cos(d*x + c) + 1)/(d*sin(d*x + c))

________________________________________________________________________________________

giac [A]  time = 0.26, size = 16, normalized size = 0.70 \[ -\frac {1}{d \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)*(cot(d*x+c)+csc(d*x+c)),x, algorithm="giac")

[Out]

-1/(d*tan(1/2*d*x + 1/2*c))

________________________________________________________________________________________

maple [A]  time = 0.10, size = 24, normalized size = 1.04 \[ \frac {-\frac {1}{\sin \left (d x +c \right )}-\cot \left (d x +c \right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)*(cot(d*x+c)+csc(d*x+c)),x)

[Out]

1/d*(-1/sin(d*x+c)-cot(d*x+c))

________________________________________________________________________________________

maxima [A]  time = 0.34, size = 22, normalized size = 0.96 \[ -\frac {\frac {1}{\sin \left (d x + c\right )} + \frac {1}{\tan \left (d x + c\right )}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)*(cot(d*x+c)+csc(d*x+c)),x, algorithm="maxima")

[Out]

-(1/sin(d*x + c) + 1/tan(d*x + c))/d

________________________________________________________________________________________

mupad [B]  time = 0.59, size = 14, normalized size = 0.61 \[ -\frac {\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cot(c + d*x) + 1/sin(c + d*x))/sin(c + d*x),x)

[Out]

-cot(c/2 + (d*x)/2)/d

________________________________________________________________________________________

sympy [A]  time = 2.11, size = 27, normalized size = 1.17 \[ \begin {cases} \frac {- \cot {\left (c + d x \right )} - \csc {\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \left (\cot {\relax (c )} + \csc {\relax (c )}\right ) \csc {\relax (c )} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)*(cot(d*x+c)+csc(d*x+c)),x)

[Out]

Piecewise(((-cot(c + d*x) - csc(c + d*x))/d, Ne(d, 0)), (x*(cot(c) + csc(c))*csc(c), True))

________________________________________________________________________________________